<#macro head title="${blogCommon.blogTitle }" cssList=[] keywords="" description="">
<!DOCTYPE html>
<html lang="zh-Hans">
<head>
	<meta charset="utf-8">
	<meta http-equiv="Cache-Control" content="no-cache" />
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="description" content="${description}${blogCommon.blogDescription}">
  	<meta name="keywords" content="${keywords}${blogCommon.blogKeywords}">
	<link rel="icon" href="${rc.contextPath}/resources/favicon.png">
	${blogCommon.blogMetas}
<#list cssList as css>
	<link rel="stylesheet" type="text/css" href="${rc.contextPath}/resources${css}">
</#list>
	<link rel="stylesheet" type="text/css" href="${rc.contextPath}/resources/css/style.css?v=1">
	<title>${title}</title>
	<#nested>
</head>
</#macro>

<#macro navigation leftMenus rightMenus>
<div class="columns">
	<div class="navigation">
		<div class="menus-main">
			<#list leftMenus as menu>
				<#if menu.title = "index">
				<a class="favicon" href="/"><img src="${rc.contextPath}/resources/favicon.png" alt="${blogCommon.blogTitle}"></a>	
				<#elseif menu.urlName ??>
				<a <#if urlName = "/"+menu.urlName>class="current"</#if> href="${rc.contextPath}/${menu.urlName}">${menu.title}</a>
				<#else>
				<a href="${menu.url}" target="blank">${menu.title}</a>
				</#if>
			</#list>
		</div>
		<div class="right menus-right">
			<#list rightMenus as menu>
				<a <#if menu.urlName ??>href="${rc.contextPath}/${menu.urlName}"<#else>href="${menu.url}" target="blank"</#if>>${menu.title}</a>
			</#list>
		</div>
	</div>
</div>
</#macro>

<#macro archiveTitle data>
<div class="archive-title">
	${data}
</div>
</#macro>

<#macro article article single=false>
<article>
	<header>
		<h2><a href="${rc.contextPath}/article/show/<#if article.urlName ??>${article.urlName}<#else>${article.articleId}</#if>">${article.title}</a></h2>
	</header>
	<div class="article-meta clearfix">
		<time class="left">${article.createDate}</time>
		<ul class="tags right">
			<#list article.tags as tag>
				<li><a href="${rc.contextPath}/tag/${tag.urlName}">${tag.title}</a></li>
			</#list>
		</ul>
	</div>
	<div class="markdown-body editormd-preview-theme-dark">
		${article.html}
	</div>
	<#if single>
	<div style="float:right;width:110px;"><div class="bdsharebuttonbox"><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_more" data-cmd="more"></a></div></div><div class="clearfix"></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"1","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"32"},"share":{},"image":{"viewList":["weixin","tsina","qzone"],"viewText":"分享到：","viewSize":"32"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["weixin","tsina","qzone"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
	</#if>
</article>
</#macro>

<#macro widgetContent content="ABC">
	<div class="widget text-content">${content}</div>
</#macro>

<#macro tags tags=[]>
	<div class="widget tags">
		<ul class="tag-list">
			<#list tags as tag>
				<li class="tag-list-item"><a href="${rc.contextPath}/tag/${tag.urlName}" class="tag-list-link">${tag.title}</a></li>
			</#list>
		</ul>
	</div>
</#macro>

<#macro archive archives=[]>
<div class="widget archives">
	<ul class="archive-list">
	<#list archives as archive>
		<li class="archive-list-item"><a href="${rc.contextPath}/archive/${archive.urlName}" class="archive-list-link">${archive.title}</a><span class="archive-list-count">${archive.count}</span></li>
	</#list>
	</ul>
</div>
</#macro>

<#macro pagination urls=[] current=1>
<div class="archive-pagination">
	<div class="paginator">
		<#list urls as url>		
		<#if url[1] = current>
			<span class="page-number current">${url[0]}</span>
		<#elseif url[1] = 1>
			<a href="${rc.contextPath}${urlName}/" class="page-number">${url[0]}</a>
		<#else>
			<a href="${rc.contextPath}${urlName}/page/${url[1]}" class="page-number">${url[0]}</a>
		</#if>
		</#list>
	</div>
</div>
</#macro>
	
<#macro footer record="">
	<div class="columns footer">
		<a href="http://www.miitbeian.gov.cn/" target="blank">${record}</a>
		${blogCommon.blogJs}
	</div>
</#macro>

<#macro otherJs jsList=[]>
	<#list jsList as js>
	<script src="${rc.contextPath}${js}"></script>
	</#list>
	<script type="text/javascript">
		<#nested>
	</script>
</#macro>

<#macro duoshuoJs>
<script type="text/javascript">
var duoshuoQuery = {short_name:"${duoshuoId}"};
(function() {
	var ds = document.createElement('script');
	ds.type = 'text/javascript';ds.async = true;
	ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
	ds.charset = 'UTF-8';
	(document.getElementsByTagName('head')[0] 
	|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
</#macro>